home *** CD-ROM | disk | FTP | other *** search
/ Amiga Tools 3 / Amiga Tools 3.iso / programming / colpectius1 / funnyizer.amos / funnyizer.amosSourceCode
AMOS Source Code  |  1995-09-07  |  1KB  |  65 lines

  1. ' Funnyizer
  2. ' ~~~~~~~~~
  3. ' by Ben Wyatt, bwyatt@paston.co.uk
  4.  
  5. Screen Open 0,640,256+56*Ntsc,2,Hires
  6. Screen Display 0,128,37,640,256+56*Ntsc
  7. Palette $0,$FFF
  8.  
  9. Dim NORM$(6)
  10. Dim ABNORM$(18)
  11. Global NORM$(),ABNORM$()
  12.  
  13. For N=1 To 18
  14.    Read ABNORM$(N)
  15. Next N
  16. For N=1 To 6
  17.    Read NORM$(N)
  18. Next N
  19. Data "B","C","D","F","G","H","J","K","L","M"
  20. Data "N","P","R","S","T","V","W","Z"
  21. Data "A","E","I","O","U","Y"
  22.  
  23. Print "Funnyizer"
  24. Print "~~~~~~~~~"
  25. Print "Type in a normal English word and I'll funnyize it"
  26. Print "Input nothing for the last word typed in"
  27. Print "Ctrl C to Quit"
  28. Print 
  29.  
  30. Repeat 
  31.    Input "A Normal Word:";B$
  32.    If B$<>""
  33.       A$=B$
  34.    Else 
  35.       Cup : Print "A Normal Word:";A$
  36.    End If 
  37.    _FUNNYIZE[A$]
  38.    If A$<>"" Then Print "    Funnyized:";Param$
  39.    Print 
  40. Until 0=1
  41. End 
  42.  
  43. Procedure _FUNNYIZE[A$]
  44.    A$=Upper$(A$)
  45.    If Len(A$)<2
  46.       Print "Sorry, But I Prefer Longer Words" : A$=""
  47.    Else 
  48.       C$=A$
  49.       Repeat 
  50.          For N=2 To Len(A$)
  51.             If Rnd(1)=1 and Mid$(A$,N,1)<>" "
  52.                M$=Mid$(A$,N,1)
  53.                For M=1 To 6
  54.                   If NORM$(M)=M$ : B$=NORM$(Rnd(5)+1) : End If 
  55.                Next M
  56.                For M=1 To 18
  57.                   If ABNORM$(M)=M$ : B$=ABNORM$(Rnd(17)+1) : End If 
  58.                Next M
  59.                Mid$(A$,N,1)=B$
  60.             End If 
  61.          Next N
  62.       Until C$<>A$
  63.       A$=Upper$(Left$(A$,1))+Lower$(Right$(A$,Len(A$)-1))
  64.    End If 
  65. End Proc[A$]